<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>QUnit Example</title>
    <link rel="stylesheet" href="components/qunit/qunit/qunit.css">
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="components/qunit/qunit/qunit.js"></script>
<script type="text/javascript" src="js/URI.js"></script>
<script type="text/javascript" src="common.js"></script>
<script type="text/javascript" src="content.js"></script>
<script type="text/javascript">
    QUnit.test("hello test", function (assert) {
        assert.ok(1 == "1", "Passed!");
    });
    QUnit.test("crawl test", function (assert) {
        assert.async();
        assert.expect(1);
        $.get("test/A.html").then(function (page) {
            $(page).crawl({sources: "a[href$='.html']", targets: "a[href$='.zip']", depth: 2, base: 'test/'}).then(function (links) {
                assert.ok(links.size == 20, "Passed!");
            }, function (error) {
                console.error("failed", error);
            });
        });
    });
</script>
</body>
</html>